﻿using System;
using System.Linq;
using System.Collections.Generic;
using System.Text;

namespace Handrise.CDCable.Mobile.Business
{
    public class APNService
    {
        public int ConnectAPN()
        {
            try
            {
                if (AppLogic.netService.CurrentNetType == NetType.None)
                {
                    CDCalbeWebService.Service webService = new CDCalbeWebService.Service();
                    webService.Url = AppLogic.config.GetParameter("Configuration/APN", "Url");
                    webService.GetServerDateTime();
                    return 0;
                }
                else
                {
                    return 1;
                }
            }
            catch (Exception e)
            {
                return -1;
            } 
        }
    }
}
